//
//  AddressListCell.m
//  penzer
//
//  Created by caiyc on 2018/10/16.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "AddressListCell.h"

@implementation AddressListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.default_Lab.layer.cornerRadius = 9;
    self.default_Lab.layer.masksToBounds = 1;
    self.default_Lab.hidden = 1;

}
- (IBAction)deleteAdd:(UIButton *)sender {
    self.dele();
}
-(void)bindData:(NSDictionary *)dic{
    self.name.text = dic[@"name"];
    self.mobile.text = [XTool setMobileToCharters:dic[@"mobile"]];
    self.address.text = [NSString stringWithFormat:@"%@%@%@%@",dic[@"province_cn"],dic[@"city_cn"],dic[@"area_cn"],dic[@"address"]];
    if([dic[@"is_default"]boolValue]==1){
        self.default_Lab.hidden = 0;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (IBAction)edit_Action:(UIButton *)sender {
    self.edit();
}
@end
